package com.jida.tijian.mapper;

import com.jida.tijian.domain.Cireport;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CireportMapper {
    int deleteByPrimaryKey(Integer cirId);

    int insert(Cireport record);

    int insertSelective(Cireport record);

    @Select("select cirId, ciId, ciName,orderId from cireport where orderId = #{orderId}")
    List<Cireport> selectByOrderId(Integer orderId);
    @Select("SELECT c.ciId,c.ciName " +
            "FROM setmeal s,setmealdetailed sd,checkitem c " +
            "WHERE s.smId=sd.smId " +
            "AND sd.ciId=c.ciId " +
            "AND s.smId=#{smId} ")
    List<Cireport> selectBySmId(Integer smId);

    Cireport selectByPrimaryKey(Integer cirId);

    int updateByPrimaryKeySelective(Cireport record);

    int updateByPrimaryKey(Cireport record);
}